<div class="so_c">
    <input type="text" class="so_text" id="search_name" size="15" value="<?=$str_search_word;?>"/>
    <a class="so_btn" id='search'>搜索</a>
</div>

<div class="keywords">
    <h4>搜索热词</h4>
    <ul class="keywords_list">
        <?php foreach( $arr_search as $key=>$val ) { ?>
        <li>
            <a href="/iphone_index.php?act=search_result&search_word=<?=$val;?>"  class="red<?=$key%3 + 1;?>">
                <?=$val;?>
            </a>
        </li>
        <?php }?>
    </ul>
    <div class="clr"></div>
</div>
<div class="ligt"></div>
<div class="keywords recently_key">
    <h4>最近搜索</h4>
    <ul class="keywords_list">
        <?php if( ! empty($arr_search_history) ) { 
            foreach( $arr_search_history as $key=>$val ) { ?>
        <li>
            <a href="/iphone_index.php?act=search_result&search_word=<?=$val;?>"  class="gray1" >
                <?=$val;?>
            </a>
        </li>
        <?php }
        } ?>
    </ul>
    <div class="clr"></div>
</div>
<div class="ligt"></div>
</div>

<script type='text/javascript'>
$(function() {
    // 搜索
    $('#search').click(function() {
        var search_name = $.trim($('#search_name').val());
        
        if( ! search_name ) {
            alert('请输入应用名称！');
            return false;
        }
        
        document.location.href = '/iphone_index.php?act=search_result&search_word=' + search_name;
    });
});
</script>

